{$taxonomy}_pre_edit_form
Action HookDescription
Fires before the Edit Term form for all taxonomies. The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug. Possible hook names include: - `category_pre_edit_form` - `post_tag_pre_edit_form`Hook Information
| File Location | wp-admin/edit-tag-form.phpView on GitHub | 
| Hook Type | Action | 
| Line Number | 69 | 
Hook Parameters
| Type | Name | Description | 
|---|---|---|
| WP_Term | $tag | Current taxonomy term object. | 
| string | $taxonomy | Current $taxonomy slug. | 
Usage Examples
                        Basic Usage
                    
                    <?php
// Hook into {$taxonomy}_pre_edit_form
add_action('{$taxonomy}_pre_edit_form', 'my_custom_function', 10, 2);
function my_custom_function($tag, $taxonomy) {
    // Your custom code here
}
Source Code Context
                        wp-admin/edit-tag-form.php:69
                        - How this hook is used in WordPress core
                    
                    <?php
  64   * @since 3.0.0
  65   *
  66   * @param WP_Term $tag      Current taxonomy term object.
  67   * @param string  $taxonomy Current $taxonomy slug.
  68   */
  69  do_action( "{$taxonomy}_pre_edit_form", $tag, $taxonomy ); ?>
  70  
  71  <div class="wrap">
  72  <h1><?php echo $tax->labels->edit_item; ?></h1>
  73  
  74  <?php
PHP Documentation
<?php
/**
 * Fires before the Edit Term form for all taxonomies.
 *
 * The dynamic portion of the hook name, `$taxonomy`, refers to
 * the taxonomy slug.
 *
 * Possible hook names include:
 *
 *  - `category_pre_edit_form`
 *  - `post_tag_pre_edit_form`
 *
 * @since 3.0.0
 *
 * @param WP_Term $tag      Current taxonomy term object.
 * @param string  $taxonomy Current $taxonomy slug.
 */
                        Quick Info
                    
                    - Hook Type: Action
- Parameters: 2
- File: wp-admin/edit-tag-form.php
                        Related Hooks
                    
                    Related hooks will be displayed here in future updates.
